
#import <UIKit/UIKit.h>
@class BK_my_EvluationStarRateView;

typedef void(^BK_my_EvluationStarRateViewFinishBlock)(CGFloat currentScore);

typedef NS_ENUM(NSInteger, RateStyle)
{
    WholeStar = 0, //只能整星评论
    HalfStar = 1,  //允许半星评论
    IncompleteStar = 2  //允许不完整星评论
};

@protocol BK_my_EvluationStarRateViewDelegate <NSObject>

-(void)starRateView:(BK_my_EvluationStarRateView *)starRateView currentScore:(CGFloat)currentScore;

@end

@interface BK_my_EvluationStarRateView : UIView

@property (nonatomic,assign)BOOL isAnimation;       //是否动画显示，默认NO
@property (nonatomic,assign)RateStyle rateStyle;    //评分样式    默认是WholeStar
@property (nonatomic, weak) id<BK_my_EvluationStarRateViewDelegate>delegate;

@property (nonatomic,assign)CGFloat currentScore;   // 当前评分：0-5  默认0


-(instancetype)initWithFrame:(CGRect)frame;
-(instancetype)initWithFrame:(CGRect)frame numberOfStars:(NSInteger)numberOfStars rateStyle:(RateStyle)rateStyle isAnination:(BOOL)isAnimation delegate:(id)delegate;


-(instancetype)initWithFrame:(CGRect)frame finish:(BK_my_EvluationStarRateViewFinishBlock)finish;
-(instancetype)initWithFrame:(CGRect)frame numberOfStars:(NSInteger)numberOfStars rateStyle:(RateStyle)rateStyle isAnination:(BOOL)isAnimation finish:(BK_my_EvluationStarRateViewFinishBlock)finish;


@end
